// API Endpoints
export const API_ENDPOINTS = {
  // Auth
  REGISTER: '/api/v1/login/register',
  LOGIN: '/api/v1/login/login',
  SEND_EMAIL: '/api/v1/login/send-email',
  SEND_VERIFY_CODE: '/api/v1/common/send-verify-code',
  VERIFY_EMAIL: '/api/v1/login/verify-email',
  REFRESH_TOKEN: '/api/v1/login/refresh-token',

  // User
  MEMBER_INFO: '/api/v1/member/info',
  UPDATE_EMAIL: '/api/v1/member/update-email',
  UPDATE_PASSWORD: '/api/v1/member/up-password',
  UPDATE_FUND_PASSWORD: '/api/v1/member/up-fund-password',
  // GRADE_LIST: '/api/v1/grade/list',
  GRADE_LIST: '/api/v1/card-category/list',

  // Config
  SYSTEM_CONFIG: '/api/v1/config/data',
  UPLOAD_FILE: '/api/v1/common/upload',

  // Recharge
  RECHARGE_INFO: '/api/v1/amount/recharge-info',
  RECHARGE_CONFIRM: '/api/v1/amount/recharge-confirm',
  RECHARGE_CANCEL: '/api/v1/amount/recharge-cancel',
  RECHARGE_LIST: '/api/v1/amount/recharge-list',
  RECHARGE_ORDER_INFO: '/api/v1/amount/recharge-order-info',
  RECHARGE_NETWORK_LIST: '/api/v1/config/wallet-network-select', // 获取充值网络列表
  RECHARGE_WALLET_LIST: '/api/v1/member/address-list', // 获取充值钱包列表
  RECHARGE_DELETE: '/api/v1/member/address-delete', // 刪除钱包地址
  RECHARGE_ADD: '/api/v1/member/address-add', // 刪除钱包地址

  // Amount
  WITHDRAW: '/api/v1/amount/withdraw',
  WITHDRAW_LIST: '/api/v1/amount/withdraw-list',
  WITHDRAW_CANCEL: '/api/v1/amount/withdraw-cancel',
  BALANCE_LOG_LIST: '/api/v1/balance-log/list',
  AMOUNT: {
    WITHDRAW_LIST: '/api/v1/amount/withdraw-list',
    WITHDRAW: '/api/v1/amount/withdraw',
    WITHDRAW_CANCEL: '/api/v1/amount/withdraw-cancel',
    BALANCE_LOG: '/api/v1/amount/balance-log',
  },

  // Cards
  CARD_CREATE: '/api/v1/card/create',
  CARD_LIST: '/api/v1/card/list',
  CARD_DETAIL: '/api/v1/card/detail',
  CARD_UPDATE: '/api/v1/card/update',
  CARD_DELETE: '/api/v1/card/delete',
  CARD_GROUP_LIST: '/api/v1/card/group/list',
  CARD_GROUP_CREATE: '/api/v1/card/group/create',
  CARD_GROUP_UPDATE: '/api/v1/card/group/update',
  CARD_GROUP_DELETE: '/api/v1/card/group/delete',

  // Transactions
  TRANSACTION_LIST: '/api/v1/transaction/list',
  TRANSACTION_DETAIL: '/api/v1/transaction/detail',
  TRANSACTION_STATS: '/api/v1/index/transactions-info',
  TRANSACTION_REFUNDS: '/api/v1/transaction/refunds',
} as const;

import { apiClient } from './client';
import type { Config } from '../types/api';

export const configApi = {
  getConfig: () => apiClient.get<Config[]>('/api/v1/config/data'),
};